package com.woniu.service;

import com.woniu.util.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author mzy
 * @time 2021/04/01 17:15:36
 */
@FeignClient("sales-service")
public interface SalesService {

    @PostMapping("/sales/findAll")
    ResultVO findAll();

    @PostMapping("/sales/findById/{sid}")
    ResultVO findById(@PathVariable("sid") @RequestParam("sid") Integer sid);

    @GetMapping("/sales/updateState/{sid}/{state}")
    ResultVO updateState( @PathVariable("sid") @RequestParam("sid") Integer sid, @PathVariable("state") @RequestParam("state") Integer state);

    @PostMapping("/sales/deletes/{sid}")
    ResultVO deletes(@PathVariable("sid") @RequestParam("sid") Integer sid);
}
